<?php include("inc/global.inc");
function chkCode(){
		if($_SESSION['chkCode']!=$_POST["wocaocode"]){
			echo"<script>alert('验证码错误');location=location</script>";exit;
		}
		return true;
	}
if($_POST['wocao']){
		 if(!chkCode()) exit;
        $c_rs=mysql_query("select * from city where id='$_POST[c_provinces]' and city_id=0");
		$c_row=mysql_fetch_array($c_rs);
		$c_rs2=mysql_query("select * from city where id='$_POST[c_city]' and city_id>0");
		$c_row2=mysql_fetch_array($c_rs2);
		$c_rs3=mysql_query("select * from city where id='$_POST[c_diqu]' and city_id>0");
		$c_row3=mysql_fetch_array($c_rs3);
		$c_provinces=($_POST[c_provinces])?$_POST[c_provinces]:0;
		$c_city=($_POST[c_city])?$_POST[c_city]:0;
		$c_diqu=($_POST[c_diqu])?$_POST[c_diqu]:0;
        $j_lilv=$_POST[j_lilv1]."%".$_POST[j_lilv2];

mysql_query("insert into jd_jiedai (jd_title,jd_jiner,jd_lilv,jd_dyw,jd_dywdz,jd_dywjz,jd_srdb,jd_dsfdb,jd_jkyt,jd_shuoming,jd_jkrmc,jd_lianxiren,jd_tel,jd_phone,jd_qq,jd_email,jd_pro_id,jd_pro,jd_city_id,jd_city,jd_diqu_id,jd_diqu,jd_xxdizhi,addtime) values ('$_POST[j_title]','$_POST[j_jiner]','$j_lilv','$_POST[j_dyw]','$_POST[j_dywdz]','$_POST[j_dywjz]','$_POST[j_srdb]','$_POST[j_dsfdb]','$_POST[j_jkyt]','$_POST[j_shuoming]','$_POST[j_jkrmc]','$_POST[j_lianxiren]','$_POST[j_tel]','$_POST[j_phone]','$_POST[j_qq]','$_POST[j_email]','$c_provinces','$c_row[city_name]','$c_city','$c_row2[city_name]','$c_diqu','$c_row3[city_name]','$_POST[j_xxdizhi]','".date("Y-m-d H:i:s")."')");

echo "<script>alert('提交成功');location='msg.php';</script>";	exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>借款方申请,三帝借贷网。</title>
<meta name="description" content="三帝借贷网专注于企业和个人提供 借贷，小额贷款，民间借贷，企业贷款，无抵押贷款，网上贷款 等贷款咨询和企业融资服务平台。" />
<meta name="keywords" content="借贷，小额贷款，民间借贷，无抵押贷款，企业贷款，网上贷款" />
<link href="/css/body.css" rel="stylesheet" type="text/css" />
<link href="/css/head.css" rel="stylesheet" type="text/css" />
<link href="/css/jd_info.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://www.sandib2b.cn/js/city.js" charset="gb2312"></script>
</head>
<body>
<div class="top">

<div class="topbox">
<div class="topleft">欢迎来到三帝贸易网&nbsp;<span class="301688"><a href="http://www.301688.com" target="_blank">301688.com</a></span> &nbsp; [<a href="/login/">登陆</a>] [<a href="/join/">免费注册</a>]</div>
<div class="topright"><a href="#" onClick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.sandib2b.cn');">设为首页</a> | <A title="三帝贸易网"  href="#" style="CURSOR: hand" onclick="javascript:window.external.AddFavorite('http://www.sandib2b.cn','三帝贸易网')">添加收藏</A> | <a href="/about">客服中心</a> | <span class="301688"><a href="/tuoguan/" target="_blank">托管保</a></span></div>
<div class="onl"></div>
</div>

</div><div class="top1 topside6">
<div style="float:left;width:255px;"><a href="/"><img src="/images/jdlogo.gif" alt="三帝借贷网" width="245" height="62" border="0" /></a></div>
<div class="menutop"></div>
<div class="menubut">
<ul>
<li><a href="/">首页</a></li>
<li><a href="/daikuan.php">贷款</a></li>  
<li><a href="/jiekuan.php" class='hover'>借款</a></li>   
<li><a href="/news.php">资讯</a></li>
</ul>
<div class="onl"></div>
</div>
<div class="onl"></div>
</div>
<div class="menu">
  <div id="search_2">
<li style="padding-top:10px;width:335px;"></li>
</div>
</div>
<div class="city side1">
<?php $c_rs=mysql_query("select * from city where city_id=0 order by order_name asc");
      while($c_row=mysql_fetch_array($c_rs)){
?>
<a href="/jiedai/jiekuan-city<?=$c_row[id]?>-c0-q0.html" <?php if($_GET[pid]==$c_row[id]){echo "style='color:red'";}?>><?=$c_row[city_name]?></a>
<?php }?>
<div class="onl"></div>
</div>
<div id="mian" class="topside6">
<div class="title">您所在的位置：<a href="/">首页</a> >> <a href="/jiekuan/">借款</a> >> 借款方申请</div>
</div>
<div id="mian" class="topside20 downside6 side">
<script type="text/javascript">/*960*90底部，创建于2011-7-6*/ var cpro_id = 'u530503';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>
<div id="mian" class="topside6">
  <div class="leftmain rightside6">
<div class="title5 size14"><span></span>借款方申请</div>
  <div class="side"> 
    <table width="100%" border="0" align="center" cellpadding="5" cellspacing="10">
      <tr>
        <td>借款详细信息（请仔细填写以下信息，以便放款人了解您）</td>
      </tr>
    </table>
    <table width="690" border="0" align="center" cellpadding="6" cellspacing="1" bgcolor="#ECE9D8">
	<FORM action="" method="post" name="form1" onSubmit="return checkform()">
    <tr>
      <td width="110" height="5" bgcolor="#FFFFFF">借款标题：<span class="fontred">*</span></td>
      <td colspan="3" bgcolor="#FFFFFF" class="fontred"><input name="j_title" id="j_title" type="text" size="60" maxlength="250" /></td>
      </tr>
    <tr>
      <td height="5" bgcolor="#FFFFFF">借款金额：<span class="fontred">*</span></td>
      <td width="210" bgcolor="#FFFFFF"><input name="j_jiner" type="text" id="j_jiner" size="10" maxlength="20" />
万元</td>
      <td width="85" bgcolor="#FFFFFF">接受利率： </td>
      <td width="232" bgcolor="#FFFFFF"><input name="j_lilv1" type="text" id="j_lilv1" value="0" size="10" maxlength="20" />
%<span class="fontred">
<select name="j_lilv2" id="j_lilv2">
  <option value="年">年</option>
  <option value="月">月</option>
</select>
0表示“商谈”</span></td>
    </tr>
    <tr>
      <td height="12" bgcolor="#FFFFFF">低押物名：</td>
      <td height="12" bgcolor="#FFFFFF"><input name="j_dyw" type="text" id="j_dyw" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">第三方担保：</td>
      <td bgcolor="#FFFFFF"><input name="j_dsfdb" type="text" id="j_dsfdb" size="30" maxlength="200" /></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">低押物价值：</td>
      <td bgcolor="#FFFFFF"><input name="j_dywjz" type="text" id="j_dywjz" size="10" maxlength="20" />
      万元</td>
      <td bgcolor="#FFFFFF">个人收入担保：</td>
      <td bgcolor="#FFFFFF"><input name="j_srdb" type="text" id="j_srdb" size="30" maxlength="200"/></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">低押物地址：</td>
      <td bgcolor="#FFFFFF"><input name="j_dywdz" type="text" id="j_dywdz" size="30" maxlength="250" /></td>
      <td bgcolor="#FFFFFF">借款用途：</td>
      <td bgcolor="#FFFFFF" class="fontred"><input name="j_jkyt" id="j_jkyt" type="text" size="30" maxlength="100" />
*</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">借款说明：</td>
      <td colspan="3" bgcolor="#FFFFFF" class="fontred"><textarea name="j_shuoming" id="j_shuoming" cols="60" rows="20"></textarea>
      *</td>
      </tr>
    <tr>
      <td colspan="4" bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
    <tr>
      <td bgcolor="#FFFFFF">借款人名称：</td>
      <td bgcolor="#FFFFFF" class="fontred"><input name="j_jkrmc" type="text" id="j_jkrmc" size="20" maxlength="50" />
        *</td>
      <td bgcolor="#FFFFFF">联系人：</td>
      <td bgcolor="#FFFFFF" class="fontred"><input name="j_lianxiren" type="text" id="j_lianxiren" size="20" maxlength="20" />
        *</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">电话：</td>
      <td bgcolor="#FFFFFF"><input name="j_tel" type="text" id="j_tel" size="20" maxlength="20" /></td>
      <td bgcolor="#FFFFFF">手机：</td>
      <td bgcolor="#FFFFFF" class="fontred"><input name="j_phone" type="text" size="20" maxlength="20" />
        *</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">在线联系：</td>
      <td bgcolor="#FFFFFF"><input name="j_qq" type="text" id="j_qq" size="30" maxlength="150" /></td>
      <td bgcolor="#FFFFFF">邮箱：</td>
      <td bgcolor="#FFFFFF"><input name="j_email" type="text" id="j_email" size="30" maxlength="150" /></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">所在地区：</td>
      <td colspan="3" bgcolor="#FFFFFF" class="fontred"><select  name="c_provinces" id="c_provinces" onChange="changecity(document.form1.c_provinces.options[document.form1.c_provinces.selectedIndex].value)">
            <option value="">--选择省份--</option>
          <?php
          $result = mysql_query("select * from city where city_id=0");    
          while($res = mysql_fetch_array($result)){    
          ?>    
          <option value="<?=$res['id']?>"><?=$res['city_name']?></option> 
          <?php }?>   
       </select>
       <select name="c_city" id="c_city" onChange="changecity2(document.form1.c_city.options[document.form1.c_city.selectedIndex].value)">
            <option value="">--选择城市--</option>
       </select>
	   <select name="c_diqu" id="c_diqu">
            <option value="">--选择地区--</option>
       </select>
        *</td>
      </tr>
    <tr>
      <td bgcolor="#FFFFFF">详细地址：</td>
      <td colspan="3" bgcolor="#FFFFFF" class="fontred"><input name="j_xxdizhi" id="j_xxdizhi" type="text" size="40" maxlength="200" />*</td>
      </tr>
	  <tr>
               <td bgcolor="#FFFFFF">验 证 码 </td>
			  <td colspan="3" bgcolor="#FFFFFF" class="fontred"><input name="wocaocode" type="text" id="chkCode" size="6" style="background:url(Images/login_6.gif) repeat-x; border:solid 1px #27B3FE; height:20px; background-color:#FFFFFF" maxlength="8">
			  <img src="inc/chk_num.php" name="img" align="absmiddle" id="img"><a onclick="javascript: reloadVerifyCode();" style="cursor:pointer;" class="bluelink">点击刷新</a>*
		      </td>
          </tr>
    <tr>
      <td height="53" colspan="4" bgcolor="#FFFFFF" class="fontred size14">提示：请认真填写以上信息，一但您提交了借款申请就无法更改所有内容。</td>
    </tr>
    <tr>
      <td height="62" colspan="4" align="center" bgcolor="#FFFFFF">
	  <input type="submit" value="提交借款申请" class="butt" name="wocao"/></td>
    </tr>
	</FORM>
  </table>
  <table width="690" border="0" align="center" cellpadding="0" cellspacing="5">
    <tr>
      <td height="1" bgcolor="#E7E7E7"></td>
    </tr>
  </table>
  <!--page-->
  <!--page end-->
  </div>
  </div>
  <div class="rightmain">
  <div><a href="http://www.sandib2b.cn/login/" target="_blank"><img src="/images/main_01.gif" width="254" height="61" border="0" /></a><a href="/jd_post.php" target="_blank"><img src="/images/main_02.gif" width="254" height="61" border="0" /></a>
</div>
  <br />
<div class="side1 topside6">
<div class="title5 size14"><span><a href="/news.php">>>更多</a></span>资讯</div>
<dl sizcache="16" sizset="76">
<?php 
$rs=mysql_query("select * from news where type_id=87 and n_sh=1 order by id desc limit 10");
while($row=mysql_fetch_array($rs)){
?>   
 <dt sizcache="16" sizset="76"><span><?=date("m-d",strtotime($row[news_time]))?></span>·<a href="/jiedai/<?=date("Y-m-d",strtotime($row[news_time]))?>/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[news_title],0,14,'utf-8')?></a></dt>
<?php }?>
</dl>
  </div>
  <br />
<script type="text/javascript">/*250*250，借贷-创建于2011-11-9*/ var cpro_id = 'u672457';</script><script 

src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
  </div>
  <div class="onl"></div>
</div>
<div id="mian" class="topside20 downside6 side">
<script type="text/javascript">/*960*90底部，创建于2011-7-6*/ var cpro_id = 'u530503';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>
<br />
<?php include("inc/foot.php");?>
</body>
</html>
<script language="javascript">
function $(id){
return document.getElementById(id);
}
function checkform(){
   if($("j_title").value==""){
      alert("借款标题不能为空");
      $("j_title").focus();
      return false;
   }
   if($("j_jiner").value==""){
      alert("借款金额不能为空");
      $("j_jiner").focus();
      return false;
   }   

   if($("j_jkyt").value==""){
      alert("借款用途不能为空");
      $("j_jkyt").focus();
      return false;
   }      
   if($("j_shuoming").value==""){
      alert("借款说明不能为空");
      $("j_shuoming").focus();
      return false;
   }
   if($("j_jkrmc").value==""){
      alert("借款人名称为能为空");
      $("j_jkrmc").focus();
      return false;
   }
   if($("j_lianxiren").value==""){
      alert("联系人不能为空");
      $("j_lianxiren").focus();
      return false;
   }
   if($("j_phone").value==""){
      alert("联系人不能为空");
      $("j_phone").focus();
      return false;
   }
   if($("c_provinces").value==""){
      alert("请选择省份");
      $("c_provinces").focus();
      return false;
   }
   if($("c_city").value==""){
      alert("请选择城市");
      $("c_city").focus();
      return false;
   }
   if($("c_diqu").value==""){
      alert("请选择地区");
      $("c_diqu").focus();
      return false;
   }
  
   if($("j_xxdizhi").value==""){
      alert("联系地址不为空");
      $("j_xxdizhi").focus();
      return false;
   } 
    if($("chkCode").value==""){
      alert("验证码不能为空");
      $("chkCode").focus();
      return false;
   } 
 
}
	function reloadVerifyCode() 
	{ 
	   var x=document.getElementById("img");
	
	   x.src="inc/chk_num.php?tm="+Math.random(); 
	  
	}

</script>
<script type="text/javascript">/*120*270，创建于2011-3-23*/ var cpro_id = 'u419785';</script><script src="http://cpro.baidu.com/cpro/ui/f.js" type="text/javascript"></script>